.TH "AVIFile" 3 "13 Oct 2009" "Version 2" "zebulon" \" -*- nroff -*-
.ad l
.nh
.SH NAME
AVIFile \- 
.SH SYNOPSIS
.br
.PP
.PP
\fC#include <avi.h>\fP
.PP
Inherits \fBRIFFFile\fP.
.PP
Inherited by \fBAVI1File\fP, and \fBAVI2File\fP.
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBAVIFile\fP ()"
.br
.ti -1c
.RI "\fBAVIFile\fP (const \fBAVIFile\fP &)"
.br
.ti -1c
.RI "virtual \fB~AVIFile\fP ()"
.br
.ti -1c
.RI "virtual \fBAVIFile\fP & \fBoperator=\fP (const \fBAVIFile\fP &)"
.br
.ti -1c
.RI "virtual void \fBInit\fP (int format, int sampleFrequency, int indexType)"
.br
.ti -1c
.RI "virtual int \fBGetFrameInfo\fP (off_t &offset, int &size, int frameNum)"
.br
.ti -1c
.RI "virtual int \fBGetFrame\fP (\fBFrame\fP *frame, int frameNum)"
.br
.ti -1c
.RI "virtual int \fBGetTotalFrames\fP ()"
.br
.ti -1c
.RI "virtual void \fBPrintDirectoryEntryData\fP (const \fBRIFFDirEntry\fP &entry)"
.br
.ti -1c
.RI "virtual bool \fBWriteFrame\fP (\fBFrame\fP *frame)"
.br
.ti -1c
.RI "virtual void \fBParseList\fP (int parent)"
.br
.ti -1c
.RI "virtual void \fBParseRIFF\fP (void)"
.br
.ti -1c
.RI "virtual void \fBReadIndex\fP (void)"
.br
.ti -1c
.RI "virtual void \fBWriteRIFF\fP (void)"
.br
.ti -1c
.RI "virtual void \fBFlushIndx\fP (int stream)"
.br
.ti -1c
.RI "virtual void \fBUpdateIndx\fP (int stream, int chunk, int duration)"
.br
.ti -1c
.RI "virtual void \fBUpdateIdx1\fP (int chunk, int flags)"
.br
.ti -1c
.RI "virtual bool \fBverifyStreamFormat\fP (FOURCC type)"
.br
.ti -1c
.RI "virtual bool \fBverifyStream\fP (FOURCC type)"
.br
.ti -1c
.RI "virtual bool \fBisOpenDML\fP (void)"
.br
.ti -1c
.RI "virtual void \fBsetDVINFO\fP (DVINFO &)"
.br
.ti -1c
.RI "virtual void \fBsetFccHandler\fP (FOURCC type, FOURCC handler)"
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "MainAVIHeader \fBmainHdr\fP"
.br
.ti -1c
.RI "AVISimpleIndex * \fBidx1\fP"
.br
.ti -1c
.RI "int \fBfile_list\fP"
.br
.ti -1c
.RI "int \fBriff_list\fP"
.br
.ti -1c
.RI "int \fBhdrl_list\fP"
.br
.ti -1c
.RI "int \fBavih_chunk\fP"
.br
.ti -1c
.RI "int \fBmovi_list\fP"
.br
.ti -1c
.RI "int \fBjunk_chunk\fP"
.br
.ti -1c
.RI "int \fBidx1_chunk\fP"
.br
.ti -1c
.RI "AVIStreamHeader \fBstreamHdr\fP [2]"
.br
.ti -1c
.RI "AVISuperIndex * \fBindx\fP [2]"
.br
.ti -1c
.RI "AVIStdIndex * \fBix\fP [2]"
.br
.ti -1c
.RI "int \fBindx_chunk\fP [2]"
.br
.ti -1c
.RI "int \fBix_chunk\fP [2]"
.br
.ti -1c
.RI "int \fBstrl_list\fP [2]"
.br
.ti -1c
.RI "int \fBstrh_chunk\fP [2]"
.br
.ti -1c
.RI "int \fBstrf_chunk\fP [2]"
.br
.ti -1c
.RI "int \fBindex_type\fP"
.br
.ti -1c
.RI "int \fBcurrent_ix00\fP"
.br
.ti -1c
.RI "DWORD \fBdmlh\fP [62]"
.br
.ti -1c
.RI "int \fBodml_list\fP"
.br
.ti -1c
.RI "int \fBdmlh_chunk\fP"
.br
.ti -1c
.RI "bool \fBisUpdateIdx1\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
base class for all AVI type files
.PP
It contains methods and members which are the same in all AVI type files regardless of the particular compression, number of streams etc.
.PP
The \fBAVIFile\fP class also contains methods for handling several indexes to the video frame content. 
.SH "Constructor & Destructor Documentation"
.PP 
.SS "AVIFile::AVIFile ()"The constructor
.PP
\fBTodo\fP
.RS 4
mainHdr not initialized 
.PP
add checking for NULL pointers
.RE
.PP

.SS "AVIFile::AVIFile (const \fBAVIFile\fP & avi)"The copy constructor
.PP
\fBTodo\fP
.RS 4
add checking for NULL pointers
.RE
.PP

.SS "AVIFile::~AVIFile ()\fC [virtual]\fP"The destructor 
.SH "Member Function Documentation"
.PP 
.SS "int AVIFile::GetFrame (\fBFrame\fP * frame, int frameNum)\fC [virtual]\fP"Read in a frame
.PP
\fBTodo\fP
.RS 4
use 64 bit seek 
.PP
we actually don't need the frame here, we could use just a void pointer 
.RE
.PP
\fBParameters:\fP
.RS 4
\fIframe\fP a reference to the frame object that will receive the frame data 
.br
\fIframeNum\fP the frame number to read 
.RE
.PP
\fBReturns:\fP
.RS 4
0 if the frame could be read, -1 otherwise 
.RE
.PP

.SS "int AVIFile::GetFrameInfo (off_t & offset, int & size, int frameNum)\fC [virtual]\fP"Find position and size of a given frame in the file
.PP
Depending on which index is available, search one of them to find position and frame size
.PP
\fBTodo\fP
.RS 4
the size parameter is redundant. All frames have the same size, which is also in the mainHdr. 
.PP
all index related operations should be isolated 
.RE
.PP
\fBParameters:\fP
.RS 4
\fIoffset\fP the file offset to the start of the frame 
.br
\fIsize\fP the size of the frame 
.br
\fIthe\fP number of the frame we wish to find 
.RE
.PP
\fBReturns:\fP
.RS 4
0 if the frame could be found, -1 otherwise 
.RE
.PP

.SS "void AVIFile::Init (int format, int sampleFrequency, int indexType)\fC [virtual]\fP"Initialize the AVI structure to its initial state, either for PAL or NTSC format
.PP
Initialize the \fBAVIFile\fP attributes: mainHdr, indx, ix00, idx1
.PP
\fBTodo\fP
.RS 4
consolidate \fBAVIFile::Init\fP, \fBAVI1File::Init\fP, \fBAVI2File::Init\fP. They are somewhat redundant. 
.RE
.PP
\fBParameters:\fP
.RS 4
\fIformat\fP pass AVI_PAL or AVI_NTSC 
.br
\fIsampleFrequency\fP the sample frequency of the audio content 
.br
\fIindexType\fP pass AVI_SMALL_INDEX or AVI_LARGE_INDEX 
.RE
.PP

.PP
Reimplemented in \fBAVI1File\fP, and \fBAVI2File\fP.
.SS "\fBAVIFile\fP & AVIFile::operator= (const \fBAVIFile\fP & avi)\fC [virtual]\fP"The assignment operator 
.PP
Reimplemented from \fBRIFFFile\fP.
.SS "void AVIFile::ParseList (int parent)\fC [virtual]\fP"If this is not a movi list, read its contents 
.PP
Reimplemented from \fBRIFFFile\fP.
.SS "void AVIFile::ParseRIFF (void)\fC [virtual]\fP"Reads the directory structure of the whole RIFF file 
.PP
Reimplemented from \fBRIFFFile\fP.
.SS "void AVIFile::PrintDirectoryEntryData (const \fBRIFFDirEntry\fP & entry)\fC [virtual]\fP"prints out a directory entry in text form
.PP
Every subclass of \fBRIFFFile\fP is supposed to override this function and to implement it for the entry types it knows about. For all other entry types it should call its parent::PrintDirectoryData.
.PP
\fBTodo\fP
.RS 4
use 64 bit routines 
.RE
.PP
\fBParameters:\fP
.RS 4
\fIentry\fP the entry to print 
.RE
.PP

.SS "virtual void AVIFile::WriteRIFF (void)\fC [inline, virtual]\fP"Writes out the directory structure
.PP
For all items in the directory list that have not been written yet, it seeks to the file position where that item should be stored and writes the type and length field. If the item has a name, it will also write the name field.
.PP
\fBNote:\fP
.RS 4
It does not write the contents of any item. Use WriteChunk to do that. 
.RE
.PP

.PP
Reimplemented from \fBRIFFFile\fP.
.PP
Reimplemented in \fBAVI1File\fP, and \fBAVI2File\fP.

.SH "Author"
.PP 
Generated automatically by Doxygen for zebulon from the source code.
